
import { deepCopy } from "../deepCopy";
import { HOME_INIT } from "../actionCreators/actionTypes";

export let homeReducer = (state = {
    bannerList: [],
    goodsList: []
}, action) => {
    let newState = deepCopy(state);
    switch (action.type) {
        case HOME_INIT:
            delete action.type;
            newState = { ...action };
            return newState;
        default:
            return state;
    }
}